package com.hao.servlet;

import com.hao.entity.product;
import com.hao.service.productservice;
import com.hao.serviceImpl.productserviceImpl;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * Created by Administrator on 2018/8/3.
 */
public class Servletupdxs extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType("text/html;charset=utf-8");
        request.setCharacterEncoding("utf-8");

        String pname="";
        productservice aa=new productserviceImpl();
        List<product> list=aa.find(pname);
        request.setAttribute("ronn", list);
        request.getRequestDispatcher("productupdfind.jsp").forward(request, response);

    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doPost(request,response);
    }
}
